/**
 * 角色信息
 */
export type RoleInfo = {
  roleName?: string | undefined;
  menuIds?: string[];
  roleDataPermissionSettingIds?: string[];
};

/**
 * 角色列表
 */
export type RoleList = {
  id: string;
  tenantId: string;
  roleId: string;
  roleName: string;
  operateCode: 0 | 1;
  isSuperAdmin: boolean;
};

/**
 * 角色对应的成员
 */
export type RolePersonnelList = {
  deptId: string;
  deptName: string;
  userList: RolePersonnelItem[];
};

export type RolePersonnelItem = {
  userId: string;
  nickName: string;
};

/**
 * 角色对应菜单
 */
export type RoleMenuList = {
  menuId: string;
  parentId: string;
  menuName: string;
  isSelect: boolean;
  children: RoleMenuList[];
};

/**
 * 添加角色——搜索成员
 */
type accountRoles = {
  roleId: string;
  roleName: string;
  dataScope: string;
};

export type RoleSearchPersonnel = {
  userId: string;
  tenantId: string;
  account: string;
  nickName: string;
  userType: string;
  mobile: string;
  sex: string;
  avatar: string;
  isDefaultPassword: boolean;
  roles: accountRoles[];
  isSelect: boolean;
};

/**
 * 数据权限范围列表
 */
export type DataScopeListItem = {
  settingId: number;
  title: string;
  priority: number;
  sequence: number;
  isDefault: boolean;
};

/**
 * 数据权限列表 data
 */
export type DataScopeList = {
  code: string;
  cnName: string;
  sequence: number;
  selectedId?: string;
  items: DataScopeListItem[];
};
